/*******************************************************************************
 *
 *	ViP model for FIMGSE
 *		version 1.0
 *
 *	fimg_sysutil.c
 *
 *	by cheolkyoo.kim
 *	Graphics IP Team in AP, Mobile Solution Development,
 *	System LSI Division, Semiconductor Business,
 *	Samsung Electronics
 *
 *	Copyright (c) 2005 FIMG team
 *
 *	All rights reserved. No part of this program may be reproduced, stored
 *	in a retrieval system, or tranmitted, in any form or by any means,
 *	electronic, mechanical, photocopying, recording, or otherwise, without
 *	the prior written permission of the author.
 *
 *	2006. 1. 3	by cheolkyoo.kim
 *		Provides functions to manage memory, register.
 *
 *	$RCSfile: math_table.h,v $
 *	$Revision: 1.1 $
 *	$Author: cheolkyoo.kim $
 *	$Date: 2006/03/10 08:29:08 $
 *	$Locker:  $
 *
 *	$Source: C:/CVS/CVSrepository/FIMG-3DSE_SW/fimg3dse_fpga/fimg3d/common/math_table.h,v $
 *	$State: Exp $
 *	$Log: math_table.h,v $
 *	Revision 1.1  2006/03/10 08:29:08  cheolkyoo.kim
 *	Initial import of FIMG-3DSE_SW package
 *	
 ******************************************************************************/
#ifndef __MATH_TABLE__
#define __MATH_TABLE__

/* Define number of entries in table */
#define NUM_ENTRIES 1024

/* Multiplication factor */
#define MUL_VAL (NUM_ENTRIES/(3.14159f * 2.0f))

/* Macros for trigonometric functions */
#define cos(x) (cos_val[(unsigned)(((x<0.0f)?(-x):(x))*MUL_VAL) & (NUM_ENTRIES-1)])
#define sin(x) (sin_val[(unsigned)(((x<0.0f)?(3.14159f-x):(x))*MUL_VAL) & (NUM_ENTRIES-1)])
#define tan(x) ((x<0.0f)? (-tan_val[(unsigned)((-x)*MUL_VAL) & (NUM_ENTRIES-1)]) : (tan_val[(unsigned)((x)*MUL_VAL)& (NUM_ENTRIES-1)] ))
#define acos(x) (acos_val[(unsigned)((x+1.0)*((NUM_ENTRIES-1.0f)/2)) & (NUM_ENTRIES-1)])

/* Lookup tables for all trigonometric functions */
const float cos_val[]={
1.000000f,0.999981f,0.999925f,0.999831f,0.999699f,0.999529f,0.999322f,0.999078f,0.998795f,0.998476f,
0.998118f,0.997723f,0.997290f,0.996820f,0.996313f,0.995767f,0.995185f,0.994565f,0.993907f,0.993212f,
0.992479f,0.991710f,0.990903f,0.990058f,0.989176f,0.988258f,0.987301f,0.986308f,0.985278f,0.984210f,
0.983105f,0.981964f,0.980785f,0.979570f,0.978317f,0.977028f,0.975702f,0.974339f,0.972940f,0.971504f,
0.970031f,0.968522f,0.966976f,0.965394f,0.963776f,0.962121f,0.960430f,0.958703f,0.956940f,0.955141f,
0.953306f,0.951435f,0.949528f,0.947585f,0.945607f,0.943593f,0.941544f,0.939459f,0.937339f,0.935183f,
0.932992f,0.930767f,0.928506f,0.926210f,0.923879f,0.921514f,0.919113f,0.916679f,0.914209f,0.911706f,
0.909168f,0.906595f,0.903989f,0.901348f,0.898674f,0.895966f,0.893224f,0.890448f,0.887639f,0.884797f,
0.881921f,0.879012f,0.876070f,0.873094f,0.870086f,0.867046f,0.863972f,0.860866f,0.857728f,0.854557f,
0.851355f,0.848120f,0.844853f,0.841554f,0.838224f,0.834862f,0.831469f,0.828044f,0.824589f,0.821102f,
0.817584f,0.814036f,0.810456f,0.806847f,0.803207f,0.799536f,0.795836f,0.792106f,0.788345f,0.784556f,
0.780736f,0.776887f,0.773009f,0.769102f,0.765166f,0.761201f,0.757208f,0.753186f,0.749135f,0.745057f,
0.740950f,0.736815f,0.732653f,0.728463f,0.724246f,0.720001f,0.715730f,0.711431f,0.707106f,0.702753f,
0.698375f,0.693970f,0.689539f,0.685082f,0.680600f,0.676091f,0.671558f,0.666998f,0.662414f,0.657805f,
0.653171f,0.648513f,0.643830f,0.639123f,0.634392f,0.629637f,0.624858f,0.620056f,0.615230f,0.610381f,
0.605509f,0.600615f,0.595698f,0.590758f,0.585796f,0.580812f,0.575806f,0.570779f,0.565730f,0.560660f,
0.555568f,0.550456f,0.545323f,0.540170f,0.534996f,0.529802f,0.524588f,0.519354f,0.514101f,0.508828f,
0.503536f,0.498226f,0.492896f,0.487548f,0.482182f,0.476797f,0.471395f,0.465974f,0.460536f,0.455081f,
0.449609f,0.444120f,0.438614f,0.433091f,0.427553f,0.421998f,0.416427f,0.410841f,0.405239f,0.399622f,
0.393990f,0.388343f,0.382681f,0.377005f,0.371315f,0.365610f,0.359892f,0.354161f,0.348416f,0.342658f,
0.336887f,0.331104f,0.325308f,0.319499f,0.313679f,0.307847f,0.302003f,0.296148f,0.290282f,0.284405f,
0.278517f,0.272618f,0.266710f,0.260791f,0.254863f,0.248925f,0.242977f,0.237021f,0.231055f,0.225081f,
0.219098f,0.213107f,0.207108f,0.201102f,0.195087f,0.189066f,0.183037f,0.177001f,0.170959f,0.164910f,
0.158855f,0.152794f,0.146727f,0.140655f,0.134577f,0.128495f,0.122407f,0.116315f,0.110219f,0.104118f,
0.098014f,0.091906f,0.085794f,0.079679f,0.073561f,0.067440f,0.061317f,0.055192f,0.049064f,0.042935f,
0.036804f,0.030671f,0.024538f,0.018403f,0.012268f,0.006132f,-0.000004f,-0.006140f,-0.012275f,-0.018410f,
-0.024545f,-0.030678f,-0.036811f,-0.042942f,-0.049071f,-0.055199f,-0.061324f,-0.067448f,-0.073568f,-0.079686f,
-0.085801f,-0.091913f,-0.098021f,-0.104125f,-0.110226f,-0.116322f,-0.122415f,-0.128502f,-0.134585f,-0.140662f,
-0.146734f,-0.152801f,-0.158862f,-0.164917f,-0.170966f,-0.177008f,-0.183044f,-0.189073f,-0.195094f,-0.201109f,
-0.207115f,-0.213114f,-0.219105f,-0.225088f,-0.231062f,-0.237028f,-0.242984f,-0.248932f,-0.254870f,-0.260798f,
-0.266717f,-0.272625f,-0.278524f,-0.284412f,-0.290289f,-0.296155f,-0.302010f,-0.307854f,-0.313686f,-0.319506f,
-0.325314f,-0.331110f,-0.336894f,-0.342665f,-0.348423f,-0.354168f,-0.359899f,-0.365617f,-0.371321f,-0.377012f,
-0.382688f,-0.388349f,-0.393996f,-0.399628f,-0.405246f,-0.410847f,-0.416434f,-0.422004f,-0.427559f,-0.433098f,
-0.438620f,-0.444126f,-0.449616f,-0.455088f,-0.460543f,-0.465981f,-0.471401f,-0.476803f,-0.482188f,-0.487554f,
-0.492902f,-0.498232f,-0.503543f,-0.508834f,-0.514107f,-0.519360f,-0.524594f,-0.529808f,-0.535002f,-0.540176f,
-0.545329f,-0.550462f,-0.555574f,-0.560666f,-0.565736f,-0.570785f,-0.575812f,-0.580818f,-0.585802f,-0.590764f,
-0.595703f,-0.600621f,-0.605515f,-0.610387f,-0.615236f,-0.620061f,-0.624864f,-0.629642f,-0.634397f,-0.639128f,
-0.643836f,-0.648518f,-0.653177f,-0.657811f,-0.662420f,-0.667004f,-0.671563f,-0.676097f,-0.680605f,-0.685088f,
-0.689544f,-0.693975f,-0.698380f,-0.702759f,-0.707111f,-0.711436f,-0.715735f,-0.720006f,-0.724251f,-0.728468f,
-0.732658f,-0.736820f,-0.740955f,-0.745061f,-0.749140f,-0.753190f,-0.757213f,-0.761206f,-0.765171f,-0.769107f,
-0.773014f,-0.776892f,-0.780741f,-0.784560f,-0.788350f,-0.792110f,-0.795840f,-0.799541f,-0.803211f,-0.806851f,
-0.810461f,-0.814040f,-0.817588f,-0.821106f,-0.824593f,-0.828048f,-0.831473f,-0.834866f,-0.838228f,-0.841558f,
-0.844857f,-0.848123f,-0.851358f,-0.854561f,-0.857732f,-0.860870f,-0.863976f,-0.867049f,-0.870090f,-0.873098f,
-0.876073f,-0.879015f,-0.881924f,-0.884800f,-0.887642f,-0.890452f,-0.893227f,-0.895969f,-0.898677f,-0.901352f,
-0.903992f,-0.906598f,-0.909171f,-0.911709f,-0.914212f,-0.916682f,-0.919116f,-0.921516f,-0.923882f,-0.926213f,
-0.928508f,-0.930769f,-0.932995f,-0.935186f,-0.937341f,-0.939461f,-0.941546f,-0.943596f,-0.945609f,-0.947588f,
-0.949530f,-0.951437f,-0.953308f,-0.955143f,-0.956942f,-0.958705f,-0.960432f,-0.962123f,-0.963778f,-0.965396f,
-0.966978f,-0.968524f,-0.970033f,-0.971505f,-0.972942f,-0.974341f,-0.975704f,-0.977030f,-0.978319f,-0.979571f,
-0.980787f,-0.981965f,-0.983107f,-0.984211f,-0.985279f,-0.986309f,-0.987303f,-0.988259f,-0.989178f,-0.990059f,
-0.990904f,-0.991711f,-0.992480f,-0.993213f,-0.993908f,-0.994565f,-0.995185f,-0.995768f,-0.996313f,-0.996821f,
-0.997291f,-0.997724f,-0.998119f,-0.998476f,-0.998796f,-0.999078f,-0.999323f,-0.999530f,-0.999699f,-0.999831f,
-0.999925f,-0.999981f,-1.000000f,-0.999981f,-0.999925f,-0.999830f,-0.999699f,-0.999529f,-0.999322f,-0.999077f,
-0.998795f,-0.998475f,-0.998118f,-0.997723f,-0.997290f,-0.996820f,-0.996312f,-0.995767f,-0.995184f,-0.994564f,
-0.993906f,-0.993211f,-0.992479f,-0.991709f,-0.990902f,-0.990057f,-0.989175f,-0.988256f,-0.987300f,-0.986307f,
-0.985276f,-0.984209f,-0.983104f,-0.981962f,-0.980784f,-0.979568f,-0.978316f,-0.977026f,-0.975700f,-0.974338f,
-0.972938f,-0.971502f,-0.970029f,-0.968520f,-0.966974f,-0.965392f,-0.963774f,-0.962119f,-0.960428f,-0.958701f,
-0.956938f,-0.955139f,-0.953304f,-0.951433f,-0.949526f,-0.947583f,-0.945605f,-0.943591f,-0.941541f,-0.939456f,
-0.937336f,-0.935181f,-0.932990f,-0.930764f,-0.928503f,-0.926207f,-0.923876f,-0.921511f,-0.919111f,-0.916676f,
-0.914206f,-0.911703f,-0.909165f,-0.906592f,-0.903986f,-0.901345f,-0.898671f,-0.895963f,-0.893221f,-0.890445f,
-0.887636f,-0.884793f,-0.881917f,-0.879008f,-0.876066f,-0.873091f,-0.870083f,-0.867042f,-0.863969f,-0.860863f,
-0.857724f,-0.854554f,-0.851351f,-0.848116f,-0.844849f,-0.841550f,-0.838220f,-0.834858f,-0.831465f,-0.828040f,
-0.824584f,-0.821098f,-0.817580f,-0.814031f,-0.810452f,-0.806842f,-0.803202f,-0.799532f,-0.795832f,-0.792101f,
-0.788341f,-0.784551f,-0.780732f,-0.776883f,-0.773005f,-0.769098f,-0.765162f,-0.761197f,-0.757203f,-0.753181f,
-0.749130f,-0.745052f,-0.740945f,-0.736811f,-0.732648f,-0.728458f,-0.724241f,-0.719996f,-0.715725f,-0.711426f,
-0.707100f,-0.702748f,-0.698370f,-0.693965f,-0.689534f,-0.685077f,-0.680594f,-0.676086f,-0.671552f,-0.666993f,
-0.662409f,-0.657800f,-0.653166f,-0.648507f,-0.643824f,-0.639117f,-0.634386f,-0.629631f,-0.624852f,-0.620050f,
-0.615224f,-0.610375f,-0.605504f,-0.600609f,-0.595692f,-0.590752f,-0.585790f,-0.580806f,-0.575800f,-0.570773f,
-0.565724f,-0.560654f,-0.555562f,-0.550450f,-0.545317f,-0.540163f,-0.534990f,-0.529796f,-0.524582f,-0.519348f,
-0.514094f,-0.508822f,-0.503530f,-0.498219f,-0.492890f,-0.487542f,-0.482175f,-0.476791f,-0.471388f,-0.465968f,
-0.460530f,-0.455075f,-0.449603f,-0.444113f,-0.438607f,-0.433085f,-0.427546f,-0.421991f,-0.416421f,-0.410834f,
-0.405232f,-0.399615f,-0.393983f,-0.388336f,-0.382674f,-0.376998f,-0.371308f,-0.365604f,-0.359886f,-0.354154f,
-0.348409f,-0.342651f,-0.336880f,-0.331097f,-0.325301f,-0.319492f,-0.313672f,-0.307840f,-0.301996f,-0.296141f,
-0.290275f,-0.284398f,-0.278510f,-0.272612f,-0.266703f,-0.260784f,-0.254856f,-0.248918f,-0.242970f,-0.237014f,
-0.231048f,-0.225074f,-0.219091f,-0.213100f,-0.207101f,-0.201094f,-0.195080f,-0.189058f,-0.183030f,-0.176994f,
-0.170952f,-0.164903f,-0.158848f,-0.152787f,-0.146720f,-0.140648f,-0.134570f,-0.128488f,-0.122400f,-0.116308f,
-0.110212f,-0.104111f,-0.098007f,-0.091898f,-0.085787f,-0.079672f,-0.073554f,-0.067433f,-0.061310f,-0.055185f,
-0.049057f,-0.042928f,-0.036796f,-0.030664f,-0.024530f,-0.018396f,-0.012261f,-0.006125f,0.000011f,0.006147f,
0.012282f,0.018418f,0.024552f,0.030686f,0.036818f,0.042949f,0.049079f,0.055206f,0.061332f,0.067455f,
0.073576f,0.079693f,0.085808f,0.091920f,0.098028f,0.104133f,0.110233f,0.116330f,0.122422f,0.128509f,
0.134592f,0.140669f,0.146742f,0.152808f,0.158869f,0.164924f,0.170973f,0.177015f,0.183051f,0.189080f,
0.195101f,0.201116f,0.207122f,0.213121f,0.219112f,0.225095f,0.231069f,0.237035f,0.242991f,0.248939f,
0.254877f,0.260805f,0.266724f,0.272632f,0.278531f,0.284419f,0.290296f,0.296162f,0.302017f,0.307861f,
0.313693f,0.319513f,0.325321f,0.331117f,0.336901f,0.342672f,0.348430f,0.354174f,0.359906f,0.365624f,
0.371328f,0.377018f,0.382694f,0.388356f,0.394003f,0.399635f,0.405252f,0.410854f,0.416440f,0.422011f,
0.427566f,0.433105f,0.438627f,0.444133f,0.449622f,0.455094f,0.460549f,0.465987f,0.471407f,0.476810f,
0.482194f,0.487561f,0.492909f,0.498238f,0.503549f,0.508841f,0.514113f,0.519366f,0.524600f,0.529814f,
0.535008f,0.540182f,0.545335f,0.550468f,0.555580f,0.560672f,0.565742f,0.570791f,0.575818f,0.580824f,
0.585808f,0.590770f,0.595709f,0.600626f,0.605521f,0.610393f,0.615241f,0.620067f,0.624869f,0.629648f,
0.634403f,0.639134f,0.643841f,0.648524f,0.653182f,0.657816f,0.662425f,0.667009f,0.671568f,0.676102f,
0.680610f,0.685093f,0.689550f,0.693981f,0.698385f,0.702764f,0.707116f,0.711441f,0.715740f,0.720011f,
0.724256f,0.728473f,0.732663f,0.736825f,0.740960f,0.745066f,0.749145f,0.753195f,0.757217f,0.761211f,
0.765176f,0.769112f,0.773019f,0.776897f,0.780745f,0.784565f,0.788354f,0.792114f,0.795845f,0.799545f,
0.803215f,0.806855f,0.810465f,0.814044f,0.817592f,0.821110f,0.824597f,0.828052f,0.831477f,0.834870f,
0.838232f,0.841562f,0.844861f,0.848127f,0.851362f,0.854565f,0.857735f,0.860874f,0.863980f,0.867053f,
0.870094f,0.873101f,0.876077f,0.879019f,0.881928f,0.884803f,0.887646f,0.890455f,0.893230f,0.895972f,
0.898680f,0.901355f,0.903995f,0.906601f,0.909174f,0.911712f,0.914215f,0.916684f,0.919119f,0.921519f,
0.923885f,0.926215f,0.928511f,0.930772f,0.932998f,0.935188f,0.937344f,0.939464f,0.941549f,0.943598f,
0.945612f,0.947590f,0.949532f,0.951439f,0.953310f,0.955145f,0.956944f,0.958707f,0.960434f,0.962125f,
0.963780f,0.965398f,0.966980f,0.968526f,0.970035f,0.971507f,0.972943f,0.974343f,0.975705f,0.977031f,
0.978320f,0.979573f,0.980788f,0.981967f,0.983108f,0.984213f,0.985280f,0.986310f,0.987304f,0.988260f,
0.989179f,0.990060f,0.990905f,0.991712f,0.992481f,0.993214f,0.993909f,0.994566f,0.995186f,0.995769f,
0.996314f,0.996821f,0.997292f,0.997724f,0.998119f,0.998476f,0.998796f,0.999078f,0.999323f,0.999530f,
0.999699f,0.999831f,0.999925f,0.999981f,
0};
const float sin_val[]={
0.000000f,0.006136f,0.012272f,0.018407f,0.024541f,0.030675f,0.036807f,0.042938f,0.049068f,0.055195f,
0.061321f,0.067444f,0.073565f,0.079683f,0.085798f,0.091909f,0.098017f,0.104122f,0.110222f,0.116319f,
0.122411f,0.128498f,0.134581f,0.140659f,0.146731f,0.152798f,0.158859f,0.164913f,0.170962f,0.177005f,
0.183040f,0.189069f,0.195091f,0.201105f,0.207112f,0.213111f,0.219102f,0.225084f,0.231059f,0.237024f,
0.242981f,0.248928f,0.254866f,0.260795f,0.266713f,0.272622f,0.278520f,0.284408f,0.290285f,0.296152f,
0.302007f,0.307850f,0.313682f,0.319503f,0.325311f,0.331107f,0.336891f,0.342661f,0.348419f,0.354164f,
0.359896f,0.365614f,0.371318f,0.377008f,0.382684f,0.388346f,0.393993f,0.399625f,0.405242f,0.410844f,
0.416430f,0.422001f,0.427556f,0.433095f,0.438617f,0.444123f,0.449612f,0.455085f,0.460540f,0.465977f,
0.471398f,0.476800f,0.482185f,0.487551f,0.492899f,0.498229f,0.503539f,0.508831f,0.514104f,0.519357f,
0.524591f,0.529805f,0.534999f,0.540173f,0.545326f,0.550459f,0.555571f,0.560663f,0.565733f,0.570782f,
0.575809f,0.580815f,0.585799f,0.590761f,0.595700f,0.600618f,0.605512f,0.610384f,0.615233f,0.620058f,
0.624861f,0.629639f,0.634395f,0.639126f,0.643833f,0.648516f,0.653174f,0.657808f,0.662417f,0.667001f,
0.671560f,0.676094f,0.680602f,0.685085f,0.689542f,0.693973f,0.698378f,0.702756f,0.707108f,0.711433f,
0.715732f,0.720004f,0.724248f,0.728466f,0.732656f,0.736818f,0.740952f,0.745059f,0.749138f,0.753188f,
0.757210f,0.761204f,0.765169f,0.769105f,0.773012f,0.776890f,0.780739f,0.784558f,0.788348f,0.792108f,
0.795838f,0.799539f,0.803209f,0.806849f,0.810458f,0.814038f,0.817586f,0.821104f,0.824591f,0.828046f,
0.831471f,0.834864f,0.838226f,0.841556f,0.844855f,0.848122f,0.851356f,0.854559f,0.857730f,0.860868f,
0.863974f,0.867047f,0.870088f,0.873096f,0.876071f,0.879013f,0.881922f,0.884798f,0.887641f,0.890450f,
0.893225f,0.895967f,0.898676f,0.901350f,0.903990f,0.906597f,0.909169f,0.911707f,0.914211f,0.916680f,
0.919115f,0.921515f,0.923881f,0.926211f,0.928507f,0.930768f,0.932994f,0.935184f,0.937340f,0.939460f,
0.941545f,0.943594f,0.945608f,0.947587f,0.949529f,0.951436f,0.953307f,0.955142f,0.956941f,0.958704f,
0.960431f,0.962122f,0.963777f,0.965395f,0.966977f,0.968523f,0.970032f,0.971505f,0.972941f,0.974340f,
0.975703f,0.977029f,0.978318f,0.979570f,0.980786f,0.981964f,0.983106f,0.984211f,0.985278f,0.986309f,
0.987302f,0.988258f,0.989177f,0.990059f,0.990903f,0.991710f,0.992480f,0.993212f,0.993907f,0.994565f,
0.995185f,0.995768f,0.996313f,0.996821f,0.997291f,0.997723f,0.998118f,0.998476f,0.998796f,0.999078f,
0.999323f,0.999530f,0.999699f,0.999831f,0.999925f,0.999981f,1.000000f,0.999981f,0.999925f,0.999831f,
0.999699f,0.999529f,0.999322f,0.999078f,0.998795f,0.998475f,0.998118f,0.997723f,0.997290f,0.996820f,
0.996312f,0.995767f,0.995184f,0.994564f,0.993907f,0.993211f,0.992479f,0.991709f,0.990902f,0.990058f,
0.989176f,0.988257f,0.987301f,0.986307f,0.985277f,0.984209f,0.983105f,0.981963f,0.980784f,0.979569f,
0.978317f,0.977027f,0.975701f,0.974338f,0.972939f,0.971503f,0.970030f,0.968521f,0.966975f,0.965393f,
0.963775f,0.962120f,0.960429f,0.958702f,0.956939f,0.955140f,0.953305f,0.951434f,0.949527f,0.947584f,
0.945606f,0.943592f,0.941543f,0.939458f,0.937337f,0.935182f,0.932991f,0.930765f,0.928504f,0.926209f,
0.923878f,0.921512f,0.919112f,0.916677f,0.914208f,0.911704f,0.909166f,0.906594f,0.903987f,0.901347f,
0.898672f,0.895964f,0.893222f,0.890447f,0.887637f,0.884795f,0.881919f,0.879010f,0.876068f,0.873093f,
0.870085f,0.867044f,0.863970f,0.860864f,0.857726f,0.854555f,0.851353f,0.848118f,0.844851f,0.841552f,
0.838222f,0.834860f,0.831467f,0.828042f,0.824586f,0.821100f,0.817582f,0.814033f,0.810454f,0.806845f,
0.803204f,0.799534f,0.795834f,0.792103f,0.788343f,0.784553f,0.780734f,0.776885f,0.773007f,0.769100f,
0.765164f,0.761199f,0.757205f,0.753183f,0.749133f,0.745054f,0.740948f,0.736813f,0.732651f,0.728461f,
0.724243f,0.719999f,0.715727f,0.711428f,0.707103f,0.702751f,0.698372f,0.693968f,0.689537f,0.685080f,
0.680597f,0.676089f,0.671555f,0.666996f,0.662412f,0.657802f,0.653169f,0.648510f,0.643827f,0.639120f,
0.634389f,0.629634f,0.624855f,0.620053f,0.615227f,0.610378f,0.605506f,0.600612f,0.595695f,0.590755f,
0.585793f,0.580809f,0.575803f,0.570776f,0.565727f,0.560657f,0.555565f,0.550453f,0.545320f,0.540166f,
0.534993f,0.529799f,0.524585f,0.519351f,0.514098f,0.508825f,0.503533f,0.498222f,0.492893f,0.487545f,
0.482178f,0.476794f,0.471391f,0.465971f,0.460533f,0.455078f,0.449606f,0.444117f,0.438611f,0.433088f,
0.427549f,0.421995f,0.416424f,0.410837f,0.405236f,0.399618f,0.393986f,0.388339f,0.382678f,0.377002f,
0.371311f,0.365607f,0.359889f,0.354158f,0.348413f,0.342655f,0.336884f,0.331100f,0.325304f,0.319496f,
0.313676f,0.307843f,0.302000f,0.296145f,0.290278f,0.284401f,0.278513f,0.272615f,0.266706f,0.260788f,
0.254859f,0.248921f,0.242974f,0.237017f,0.231052f,0.225077f,0.219095f,0.213104f,0.207105f,0.201098f,
0.195084f,0.189062f,0.183033f,0.176997f,0.170955f,0.164906f,0.158851f,0.152790f,0.146724f,0.140651f,
0.134574f,0.128491f,0.122404f,0.116312f,0.110215f,0.104115f,0.098010f,0.091902f,0.085790f,0.079675f,
0.073558f,0.067437f,0.061314f,0.055188f,0.049061f,0.042931f,0.036800f,0.030668f,0.024534f,0.018400f,
0.012264f,0.006129f,-0.000007f,-0.006143f,-0.012279f,-0.018414f,-0.024549f,-0.030682f,-0.036815f,-0.042946f,
-0.049075f,-0.055203f,-0.061328f,-0.067451f,-0.073572f,-0.079690f,-0.085805f,-0.091916f,-0.098025f,-0.104129f,
-0.110230f,-0.116326f,-0.122418f,-0.128506f,-0.134588f,-0.140666f,-0.146738f,-0.152805f,-0.158866f,-0.164921f,
-0.170969f,-0.177012f,-0.183047f,-0.189076f,-0.195098f,-0.201112f,-0.207119f,-0.213118f,-0.219109f,-0.225091f,
-0.231066f,-0.237031f,-0.242988f,-0.248935f,-0.254873f,-0.260802f,-0.266720f,-0.272629f,-0.278527f,-0.284415f,
-0.290292f,-0.296158f,-0.302014f,-0.307857f,-0.313689f,-0.319510f,-0.325318f,-0.331114f,-0.336897f,-0.342668f,
-0.348426f,-0.354171f,-0.359903f,-0.365621f,-0.371325f,-0.377015f,-0.382691f,-0.388353f,-0.394000f,-0.399632f,
-0.405249f,-0.410851f,-0.416437f,-0.422008f,-0.427563f,-0.433101f,-0.438624f,-0.444130f,-0.449619f,-0.455091f,
-0.460546f,-0.465984f,-0.471404f,-0.476807f,-0.482191f,-0.487558f,-0.492906f,-0.498235f,-0.503546f,-0.508837f,
-0.514110f,-0.519363f,-0.524597f,-0.529811f,-0.535005f,-0.540179f,-0.545332f,-0.550465f,-0.555577f,-0.560669f,
-0.565739f,-0.570788f,-0.575815f,-0.580821f,-0.585805f,-0.590767f,-0.595706f,-0.600623f,-0.605518f,-0.610390f,
-0.615239f,-0.620064f,-0.624866f,-0.629645f,-0.634400f,-0.639131f,-0.643838f,-0.648521f,-0.653180f,-0.657813f,
-0.662422f,-0.667007f,-0.671566f,-0.676099f,-0.680608f,-0.685090f,-0.689547f,-0.693978f,-0.698383f,-0.702761f,
-0.707113f,-0.711439f,-0.715737f,-0.720009f,-0.724253f,-0.728471f,-0.732660f,-0.736823f,-0.740957f,-0.745064f,
-0.749142f,-0.753193f,-0.757215f,-0.761208f,-0.765173f,-0.769109f,-0.773016f,-0.776894f,-0.780743f,-0.784562f,
-0.788352f,-0.792112f,-0.795843f,-0.799543f,-0.803213f,-0.806853f,-0.810463f,-0.814042f,-0.817590f,-0.821108f,
-0.824595f,-0.828050f,-0.831475f,-0.834868f,-0.838230f,-0.841560f,-0.844859f,-0.848125f,-0.851360f,-0.854563f,
-0.857734f,-0.860872f,-0.863978f,-0.867051f,-0.870092f,-0.873100f,-0.876075f,-0.879017f,-0.881926f,-0.884802f,
-0.887644f,-0.890453f,-0.893229f,-0.895971f,-0.898679f,-0.901353f,-0.903994f,-0.906600f,-0.909172f,-0.911710f,
-0.914214f,-0.916683f,-0.919118f,-0.921518f,-0.923883f,-0.926214f,-0.928510f,-0.930771f,-0.932996f,-0.935187f,
-0.937343f,-0.939463f,-0.941547f,-0.943597f,-0.945611f,-0.947589f,-0.949531f,-0.951438f,-0.953309f,-0.955144f,
-0.956943f,-0.958706f,-0.960433f,-0.962124f,-0.963779f,-0.965397f,-0.966979f,-0.968525f,-0.970034f,-0.971506f,
-0.972942f,-0.974342f,-0.975704f,-0.977030f,-0.978320f,-0.979572f,-0.980787f,-0.981966f,-0.983107f,-0.984212f,
-0.985279f,-0.986310f,-0.987303f,-0.988259f,-0.989178f,-0.990060f,-0.990904f,-0.991711f,-0.992481f,-0.993213f,
-0.993908f,-0.994566f,-0.995186f,-0.995768f,-0.996314f,-0.996821f,-0.997291f,-0.997724f,-0.998119f,-0.998476f,
-0.998796f,-0.999078f,-0.999323f,-0.999530f,-0.999699f,-0.999831f,-0.999925f,-0.999981f,-1.000000f,-0.999981f,
-0.999925f,-0.999830f,-0.999699f,-0.999529f,-0.999322f,-0.999077f,-0.998795f,-0.998475f,-0.998117f,-0.997722f,
-0.997290f,-0.996819f,-0.996312f,-0.995766f,-0.995184f,-0.994563f,-0.993906f,-0.993211f,-0.992478f,-0.991708f,
-0.990901f,-0.990057f,-0.989175f,-0.988256f,-0.987300f,-0.986306f,-0.985276f,-0.984208f,-0.983103f,-0.981962f,
-0.980783f,-0.979567f,-0.978315f,-0.977026f,-0.975700f,-0.974337f,-0.972937f,-0.971501f,-0.970028f,-0.968519f,
-0.966974f,-0.965391f,-0.963773f,-0.962118f,-0.960427f,-0.958700f,-0.956937f,-0.955138f,-0.953303f,-0.951431f,
-0.949525f,-0.947582f,-0.945604f,-0.943590f,-0.941540f,-0.939455f,-0.937335f,-0.935179f,-0.932989f,-0.930763f,
-0.928502f,-0.926206f,-0.923875f,-0.921509f,-0.919109f,-0.916674f,-0.914205f,-0.911701f,-0.909163f,-0.906591f,
-0.903984f,-0.901344f,-0.898669f,-0.895961f,-0.893219f,-0.890443f,-0.887634f,-0.884792f,-0.881916f,-0.879007f,
-0.876064f,-0.873089f,-0.870081f,-0.867040f,-0.863967f,-0.860861f,-0.857722f,-0.854552f,-0.851349f,-0.848114f,
-0.844847f,-0.841548f,-0.838218f,-0.834856f,-0.831463f,-0.828038f,-0.824582f,-0.821096f,-0.817578f,-0.814029f,
-0.810450f,-0.806840f,-0.803200f,-0.799530f,-0.795829f,-0.792099f,-0.788339f,-0.784549f,-0.780729f,-0.776881f,
-0.773003f,-0.769095f,-0.765159f,-0.761194f,-0.757201f,-0.753179f,-0.749128f,-0.745049f,-0.740943f,-0.736808f,
-0.732646f,-0.728456f,-0.724238f,-0.719994f,-0.715722f,-0.711423f,-0.707098f,-0.702746f,-0.698367f,-0.693962f,
-0.689531f,-0.685074f,-0.680592f,-0.676083f,-0.671549f,-0.666990f,-0.662406f,-0.657797f,-0.653163f,-0.648505f,
-0.643822f,-0.639115f,-0.634383f,-0.629628f,-0.624849f,-0.620047f,-0.615221f,-0.610373f,-0.605501f,-0.600606f,
-0.595689f,-0.590749f,-0.585787f,-0.580803f,-0.575798f,-0.570770f,-0.565721f,-0.560651f,-0.555559f,-0.550447f,
-0.545314f,-0.540160f,-0.534986f,-0.529792f,-0.524578f,-0.519345f,-0.514091f,-0.508819f,-0.503527f,-0.498216f,
-0.492887f,-0.487539f,-0.482172f,-0.476788f,-0.471385f,-0.465965f,-0.460527f,-0.455072f,-0.449599f,-0.444110f,
-0.438604f,-0.433082f,-0.427543f,-0.421988f,-0.416417f,-0.410831f,-0.405229f,-0.399612f,-0.393980f,-0.388333f,
-0.382671f,-0.376995f,-0.371305f,-0.365600f,-0.359882f,-0.354151f,-0.348406f,-0.342648f,-0.336877f,-0.331093f,
-0.325297f,-0.319489f,-0.313669f,-0.307837f,-0.301993f,-0.296138f,-0.290271f,-0.284394f,-0.278506f,-0.272608f,
-0.266699f,-0.260781f,-0.254852f,-0.248914f,-0.242967f,-0.237010f,-0.231045f,-0.225070f,-0.219088f,-0.213097f,
-0.207098f,-0.201091f,-0.195077f,-0.189055f,-0.183026f,-0.176990f,-0.170948f,-0.164899f,-0.158844f,-0.152783f,
-0.146716f,-0.140644f,-0.134567f,-0.128484f,-0.122397f,-0.116305f,-0.110208f,-0.104107f,-0.098003f,-0.091895f,
-0.085783f,-0.079668f,-0.073550f,-0.067430f,-0.061306f,-0.055181f,-0.049053f,-0.042924f,-0.036793f,-0.030660f,
-0.024527f,-0.018392f,-0.012257f,-0.006121f,
0};

const float tan_val[]={
0.000000f,0.006136f,0.012272f,0.018410f,0.024549f,0.030689f,0.036832f,0.042978f,0.049127f,0.055280f,
0.061436f,0.067598f,0.073765f,0.079937f,0.086115f,0.092300f,0.098492f,0.104691f,0.110898f,0.117114f,
0.123339f,0.129573f,0.135817f,0.142071f,0.148336f,0.154613f,0.160902f,0.167203f,0.173517f,0.179844f,
0.186186f,0.192542f,0.198913f,0.205299f,0.211702f,0.218121f,0.224558f,0.231012f,0.237485f,0.243977f,
0.250488f,0.257019f,0.263570f,0.270143f,0.276738f,0.283355f,0.289995f,0.296659f,0.303347f,0.310061f,
0.316799f,0.323564f,0.330356f,0.337176f,0.344023f,0.350900f,0.357807f,0.364743f,0.371711f,0.378711f,
0.385744f,0.392809f,0.399909f,0.407044f,0.414215f,0.421422f,0.428666f,0.435949f,0.443271f,0.450632f,
0.458035f,0.465479f,0.472966f,0.480496f,0.488072f,0.495692f,0.503359f,0.511074f,0.518837f,0.526649f,
0.534513f,0.542428f,0.550396f,0.558417f,0.566495f,0.574628f,0.582819f,0.591069f,0.599379f,0.607750f,
0.616184f,0.624682f,0.633245f,0.641875f,0.650573f,0.659341f,0.668181f,0.677093f,0.686079f,0.695142f,
0.704282f,0.713501f,0.722801f,0.732185f,0.741653f,0.751207f,0.760851f,0.770584f,0.780410f,0.790331f,
0.800348f,0.810464f,0.820681f,0.831002f,0.841429f,0.851963f,0.862609f,0.873368f,0.884242f,0.895236f,
0.906350f,0.917589f,0.928956f,0.940452f,0.952082f,0.963849f,0.975756f,0.987806f,1.000004f,1.012351f,
1.024854f,1.037514f,1.050337f,1.063326f,1.076485f,1.089820f,1.103334f,1.117033f,1.130920f,1.145002f,
1.159283f,1.173768f,1.188464f,1.203375f,1.218509f,1.233870f,1.249466f,1.265303f,1.281387f,1.297727f,
1.314328f,1.331200f,1.348350f,1.365786f,1.383516f,1.401551f,1.419898f,1.438567f,1.457569f,1.476914f,
1.496613f,1.516677f,1.537118f,1.557948f,1.579181f,1.600829f,1.622906f,1.645427f,1.668408f,1.691864f,
1.715813f,1.740271f,1.765257f,1.790790f,1.816891f,1.843580f,1.870880f,1.898814f,1.927406f,1.956683f,
1.986671f,2.017400f,2.048899f,2.081200f,2.114337f,2.148344f,2.183261f,2.219125f,2.255980f,2.293869f,
2.332841f,2.372944f,2.414232f,2.456762f,2.500594f,2.545792f,2.592424f,2.640564f,2.690289f,2.741684f,
2.794838f,2.849846f,2.906813f,2.965848f,3.027073f,3.090614f,3.156612f,3.225218f,3.296593f,3.370916f,
3.448378f,3.529189f,3.613578f,3.701794f,3.794110f,3.890827f,3.992276f,4.098819f,4.210860f,4.328844f,
4.453267f,4.584681f,4.723703f,4.871024f,5.027423f,5.193778f,5.371086f,5.560479f,5.763252f,5.980893f,
6.215117f,6.467913f,6.741605f,7.038917f,7.363070f,7.717900f,8.108009f,8.538965f,9.017579f,9.552261f,
10.153524f,10.834684f,11.612864f,12.510453f,13.557307f,14.794135f,16.277933f,18.091031f,20.356924f,23.269686f,
27.152780f,32.588478f,40.741401f,54.329313f,81.507098f,163.068448f,-276243.851186f,-162.876147f,-81.459021f,-54.307944f,
-40.729380f,-32.580783f,-27.147436f,-23.265759f,-20.353917f,-18.088654f,-16.276008f,-14.792543f,-13.555969f,-12.509313f,
-11.611880f,-10.833827f,-10.152770f,-9.551593f,-9.016983f,-8.538430f,-8.107525f,-7.717462f,-7.362671f,-7.038551f,
-6.741269f,-6.467603f,-6.214830f,-5.980627f,-5.763005f,-5.560248f,-5.370870f,-5.193576f,-5.027232f,-4.870845f,
-4.723534f,-4.584521f,-4.453116f,-4.328701f,-4.210724f,-4.098690f,-3.992153f,-3.890710f,-3.793999f,-3.701687f,
-3.613476f,-3.529092f,-3.448285f,-3.370826f,-3.296507f,-3.225135f,-3.156533f,-3.090538f,-3.026999f,-2.965777f,
-2.906744f,-2.849780f,-2.794774f,-2.741622f,-2.690230f,-2.640506f,-2.592368f,-2.545737f,-2.500541f,-2.456711f,
-2.414183f,-2.372896f,-2.332794f,-2.293824f,-2.255936f,-2.219082f,-2.183219f,-2.148304f,-2.114297f,-2.081161f,
-2.048861f,-2.017363f,-1.986636f,-1.956648f,-1.927372f,-1.898780f,-1.870847f,-1.843548f,-1.816860f,-1.790760f,
-1.765227f,-1.740242f,-1.715784f,-1.691836f,-1.668381f,-1.645400f,-1.622880f,-1.600803f,-1.579155f,-1.557924f,
-1.537094f,-1.516653f,-1.496590f,-1.476891f,-1.457547f,-1.438545f,-1.419876f,-1.401529f,-1.383495f,-1.365765f,
-1.348330f,-1.331180f,-1.314309f,-1.297707f,-1.281368f,-1.265284f,-1.249447f,-1.233852f,-1.218491f,-1.203357f,
-1.188446f,-1.173751f,-1.159266f,-1.144985f,-1.130904f,-1.117016f,-1.103318f,-1.089804f,-1.076470f,-1.063310f,
-1.050322f,-1.037499f,-1.024839f,-1.012337f,-0.999989f,-0.987792f,-0.975742f,-0.963835f,-0.952069f,-0.940439f,
-0.928942f,-0.917576f,-0.906337f,-0.895222f,-0.884229f,-0.873355f,-0.862596f,-0.851951f,-0.841416f,-0.830990f,
-0.820669f,-0.810452f,-0.800336f,-0.790319f,-0.780398f,-0.770573f,-0.760839f,-0.751196f,-0.741642f,-0.732174f,
-0.722790f,-0.713490f,-0.704271f,-0.695131f,-0.686068f,-0.677082f,-0.668170f,-0.659331f,-0.650563f,-0.641865f,
-0.633235f,-0.624671f,-0.616174f,-0.607740f,-0.599369f,-0.591059f,-0.582809f,-0.574618f,-0.566485f,-0.558408f,
-0.550386f,-0.542418f,-0.534503f,-0.526640f,-0.518827f,-0.511064f,-0.503350f,-0.495683f,-0.488063f,-0.480488f,
-0.472957f,-0.465470f,-0.458026f,-0.450624f,-0.443262f,-0.435940f,-0.428658f,-0.421413f,-0.414206f,-0.407036f,
-0.399901f,-0.392801f,-0.385735f,-0.378703f,-0.371703f,-0.364735f,-0.357798f,-0.350892f,-0.344015f,-0.337168f,
-0.330348f,-0.323556f,-0.316791f,-0.310053f,-0.303340f,-0.296651f,-0.289987f,-0.283347f,-0.276730f,-0.270135f,
-0.263563f,-0.257011f,-0.250480f,-0.243969f,-0.237477f,-0.231005f,-0.224550f,-0.218114f,-0.211695f,-0.205292f,
-0.198905f,-0.192534f,-0.186178f,-0.179837f,-0.173509f,-0.167195f,-0.160894f,-0.154606f,-0.148329f,-0.142064f,
-0.135809f,-0.129565f,-0.123331f,-0.117107f,-0.110891f,-0.104684f,-0.098484f,-0.092293f,-0.086108f,-0.079930f,
-0.073757f,-0.067591f,-0.061429f,-0.055272f,-0.049120f,-0.042971f,-0.036825f,-0.030682f,-0.024541f,-0.018403f,
-0.012265f,-0.006129f,0.000007f,0.006143f,0.012280f,0.018417f,0.024556f,0.030697f,0.036840f,0.042985f,
0.049134f,0.055287f,0.061444f,0.067605f,0.073772f,0.079944f,0.086122f,0.092307f,0.098499f,0.104698f,
0.110905f,0.117121f,0.123346f,0.129580f,0.135824f,0.142078f,0.148344f,0.154620f,0.160909f,0.167210f,
0.173524f,0.179852f,0.186193f,0.192549f,0.198920f,0.205307f,0.211710f,0.218129f,0.224566f,0.231020f,
0.237493f,0.243984f,0.250495f,0.257026f,0.263578f,0.270151f,0.276746f,0.283363f,0.290003f,0.296667f,
0.303355f,0.310069f,0.316807f,0.323572f,0.330364f,0.337184f,0.344032f,0.350908f,0.357815f,0.364752f,
0.371720f,0.378719f,0.385752f,0.392818f,0.399918f,0.407052f,0.414223f,0.421430f,0.428675f,0.435958f,
0.443279f,0.450641f,0.458044f,0.465488f,0.472975f,0.480505f,0.488080f,0.495701f,0.503368f,0.511083f,
0.518846f,0.526659f,0.534522f,0.542437f,0.550405f,0.558427f,0.566504f,0.574638f,0.582829f,0.591079f,
0.599388f,0.607760f,0.616194f,0.624692f,0.633255f,0.641885f,0.650584f,0.659352f,0.668191f,0.677103f,
0.686090f,0.695152f,0.704292f,0.713512f,0.722812f,0.732196f,0.741664f,0.751219f,0.760862f,0.770596f,
0.780422f,0.790342f,0.800360f,0.810476f,0.820694f,0.831014f,0.841441f,0.851976f,0.862621f,0.873380f,
0.884255f,0.895249f,0.906363f,0.917603f,0.928969f,0.940466f,0.952096f,0.963863f,0.975770f,0.987821f,
1.000018f,1.012366f,1.024869f,1.037529f,1.050352f,1.063341f,1.076501f,1.089836f,1.103350f,1.117049f,
1.130937f,1.145018f,1.159300f,1.173785f,1.188481f,1.203393f,1.218527f,1.233888f,1.249484f,1.265321f,
1.281406f,1.297746f,1.314348f,1.331220f,1.348370f,1.365807f,1.383537f,1.401572f,1.419919f,1.438589f,
1.457592f,1.476937f,1.496637f,1.516701f,1.537142f,1.557973f,1.579206f,1.600854f,1.622932f,1.645454f,
1.668436f,1.691892f,1.715841f,1.740300f,1.765287f,1.790821f,1.816922f,1.843612f,1.870912f,1.898847f,
1.927440f,1.956718f,1.986707f,2.017437f,2.048937f,2.081239f,2.114376f,2.148385f,2.183302f,2.219168f,
2.256024f,2.293915f,2.332887f,2.372992f,2.414282f,2.456813f,2.500646f,2.545846f,2.592480f,2.640621f,
2.690349f,2.741746f,2.794901f,2.849912f,2.906881f,2.965919f,3.027146f,3.090690f,3.156692f,3.225300f,
3.296679f,3.371005f,3.448471f,3.529287f,3.613680f,3.701900f,3.794221f,3.890944f,3.992398f,4.098948f,
4.210995f,4.328987f,4.453418f,4.584840f,4.723871f,4.871203f,5.027613f,5.193981f,5.371302f,5.560710f,
5.763500f,5.981159f,6.215404f,6.468223f,6.741941f,7.039283f,7.363470f,7.718339f,8.108492f,8.539501f,
9.018175f,9.552929f,10.154277f,10.835541f,11.613847f,12.511594f,13.558645f,14.795727f,16.279859f,18.093408f,
20.359932f,23.273614f,27.158126f,32.596176f,40.753430f,54.350698f,81.555232f,163.261203f,-92081.283726f,-162.684299f,
-81.411001f,-54.286592f,-40.717366f,-32.573093f,-27.142094f,-23.261833f,-20.350911f,-18.086278f,-16.274083f,-14.790952f,
-13.554631f,-12.508173f,-11.610897f,-10.832970f,-10.152017f,-9.550926f,-9.016388f,-8.537895f,-8.107042f,-7.717023f,
-7.362271f,-7.038185f,-6.740932f,-6.467293f,-6.214543f,-5.980361f,-5.762757f,-5.560017f,-5.370654f,-5.193373f,
-5.027042f,-4.870666f,-4.723365f,-4.584362f,-4.452965f,-4.328558f,-4.210589f,-4.098561f,-3.992030f,-3.890594f,
-3.793887f,-3.701581f,-3.613374f,-3.528994f,-3.448191f,-3.370737f,-3.296421f,-3.225052f,-3.156454f,-3.090461f,
-3.026925f,-2.965707f,-2.906676f,-2.849714f,-2.794710f,-2.741561f,-2.690170f,-2.640448f,-2.592312f,-2.545683f,
-2.500489f,-2.456660f,-2.414133f,-2.372848f,-2.332747f,-2.293779f,-2.255892f,-2.219039f,-2.183177f,-2.148263f,
-2.114257f,-2.081123f,-2.048824f,-2.017327f,-1.986600f,-1.956613f,-1.927338f,-1.898747f,-1.870814f,-1.843516f,
-1.816828f,-1.790729f,-1.765197f,-1.740213f,-1.715756f,-1.691809f,-1.668353f,-1.645374f,-1.622853f,-1.600777f,
-1.579130f,-1.557899f,-1.537069f,-1.516629f,-1.496566f,-1.476868f,-1.457524f,-1.438523f,-1.419854f,-1.401508f,
-1.383474f,-1.365744f,-1.348309f,-1.331160f,-1.314289f,-1.297688f,-1.281349f,-1.265265f,-1.249429f,-1.233833f,
-1.218473f,-1.203340f,-1.188429f,-1.173734f,-1.159249f,-1.144968f,-1.130887f,-1.117000f,-1.103302f,-1.089788f,
-1.076454f,-1.063295f,-1.050306f,-1.037484f,-1.024824f,-1.012322f,-0.999975f,-0.987778f,-0.975728f,-0.963821f,
-0.952055f,-0.940425f,-0.928929f,-0.917563f,-0.906324f,-0.895209f,-0.884216f,-0.873342f,-0.862584f,-0.851938f,
-0.841404f,-0.830978f,-0.820657f,-0.810440f,-0.800324f,-0.790307f,-0.780387f,-0.770561f,-0.760828f,-0.751185f,
-0.741630f,-0.732163f,-0.722779f,-0.713479f,-0.704260f,-0.695120f,-0.686058f,-0.677072f,-0.668160f,-0.659321f,
-0.650553f,-0.641854f,-0.633225f,-0.624661f,-0.616164f,-0.607730f,-0.599359f,-0.591049f,-0.582800f,-0.574609f,
-0.566475f,-0.558398f,-0.550377f,-0.542409f,-0.534494f,-0.526631f,-0.518818f,-0.511055f,-0.503341f,-0.495674f,
-0.488054f,-0.480479f,-0.472948f,-0.465462f,-0.458017f,-0.450615f,-0.443253f,-0.435932f,-0.428649f,-0.421405f,
-0.414198f,-0.407027f,-0.399892f,-0.392793f,-0.385727f,-0.378695f,-0.371695f,-0.364727f,-0.357790f,-0.350884f,
-0.344007f,-0.337160f,-0.330340f,-0.323548f,-0.316783f,-0.310045f,-0.303332f,-0.296643f,-0.289980f,-0.283339f,
-0.276722f,-0.270128f,-0.263555f,-0.257003f,-0.250472f,-0.243961f,-0.237470f,-0.230997f,-0.224543f,-0.218106f,
-0.211687f,-0.205284f,-0.198898f,-0.192527f,-0.186171f,-0.179829f,-0.173502f,-0.167188f,-0.160887f,-0.154598f,
-0.148322f,-0.142056f,-0.135802f,-0.129558f,-0.123324f,-0.117099f,-0.110884f,-0.104676f,-0.098477f,-0.092285f,
-0.086100f,-0.079922f,-0.073750f,-0.067583f,-0.061422f,-0.055265f,-0.049112f,-0.042963f,-0.036818f,-0.030675f,
-0.024534f,-0.018395f,-0.012258f,-0.006122f,
0};
const float acos_val[]={
3.141593f,3.079052f,3.053132f,3.033234f,3.016450f,3.001656f,2.988275f,2.975963f,2.964498f,2.953725f,
2.943530f,2.933829f,2.924555f,2.915655f,2.907088f,2.898817f,2.890814f,2.883053f,2.875514f,2.868178f,
2.861028f,2.854052f,2.847237f,2.840571f,2.834046f,2.827652f,2.821382f,2.815228f,2.809184f,2.803244f,
2.797402f,2.791655f,2.785996f,2.780422f,2.774930f,2.769514f,2.764173f,2.758903f,2.753701f,2.748565f,
2.743491f,2.738478f,2.733523f,2.728624f,2.723780f,2.718987f,2.714245f,2.709553f,2.704907f,2.700307f,
2.695752f,2.691239f,2.686768f,2.682338f,2.677947f,2.673595f,2.669279f,2.665000f,2.660755f,2.656546f,
2.652369f,2.648225f,2.644113f,2.640031f,2.635980f,2.631958f,2.627965f,2.624000f,2.620062f,2.616151f,
2.612267f,2.608408f,2.604574f,2.600764f,2.596979f,2.593217f,2.589478f,2.585762f,2.582068f,2.578395f,
2.574744f,2.571113f,2.567503f,2.563913f,2.560343f,2.556792f,2.553260f,2.549746f,2.546251f,2.542774f,
2.539314f,2.535872f,2.532446f,2.529038f,2.525646f,2.522270f,2.518910f,2.515565f,2.512236f,2.508923f,
2.505624f,2.502339f,2.499070f,2.495814f,2.492573f,2.489345f,2.486131f,2.482930f,2.479742f,2.476568f,
2.473406f,2.470256f,2.467120f,2.463995f,2.460883f,2.457782f,2.454693f,2.451616f,2.448550f,2.445496f,
2.442453f,2.439420f,2.436399f,2.433388f,2.430387f,2.427398f,2.424418f,2.421448f,2.418489f,2.415539f,
2.412600f,2.409669f,2.406749f,2.403838f,2.400936f,2.398043f,2.395159f,2.392285f,2.389419f,2.386562f,
2.383713f,2.380873f,2.378042f,2.375219f,2.372404f,2.369597f,2.366798f,2.364008f,2.361225f,2.358450f,
2.355683f,2.352923f,2.350171f,2.347426f,2.344689f,2.341959f,2.339237f,2.336521f,2.333813f,2.331111f,
2.328417f,2.325729f,2.323048f,2.320374f,2.317706f,2.315045f,2.312391f,2.309742f,2.307101f,2.304465f,
2.301836f,2.299213f,2.296596f,2.293986f,2.291381f,2.288782f,2.286189f,2.283602f,2.281021f,2.278445f,
2.275875f,2.273311f,2.270752f,2.268199f,2.265651f,2.263108f,2.260571f,2.258040f,2.255513f,2.252992f,
2.250475f,2.247964f,2.245458f,2.242957f,2.240461f,2.237970f,2.235484f,2.233003f,2.230526f,2.228054f,
2.225587f,2.223124f,2.220667f,2.218213f,2.215765f,2.213320f,2.210880f,2.208445f,2.206014f,2.203588f,
2.201165f,2.198747f,2.196333f,2.193924f,2.191518f,2.189117f,2.186720f,2.184327f,2.181938f,2.179552f,
2.177171f,2.174794f,2.172421f,2.170051f,2.167686f,2.165324f,2.162966f,2.160611f,2.158261f,2.155914f,
2.153570f,2.151231f,2.148894f,2.146562f,2.144233f,2.141907f,2.139585f,2.137266f,2.134951f,2.132639f,
2.130331f,2.128026f,2.125724f,2.123425f,2.121130f,2.118838f,2.116549f,2.114263f,2.111981f,2.109701f,
2.107425f,2.105152f,2.102882f,2.100614f,2.098350f,2.096089f,2.093831f,2.091576f,2.089323f,2.087074f,
2.084827f,2.082583f,2.080342f,2.078104f,2.075869f,2.073636f,2.071406f,2.069179f,2.066955f,2.064733f,
2.062514f,2.060298f,2.058084f,2.055872f,2.053664f,2.051458f,2.049254f,2.047053f,2.044854f,2.042658f,
2.040465f,2.038273f,2.036084f,2.033898f,2.031714f,2.029532f,2.027353f,2.025176f,2.023002f,2.020829f,
2.018659f,2.016491f,2.014326f,2.012162f,2.010001f,2.007842f,2.005685f,2.003531f,2.001378f,1.999228f,
1.997080f,1.994934f,1.992790f,1.990648f,1.988508f,1.986370f,1.984234f,1.982100f,1.979968f,1.977838f,
1.975710f,1.973584f,1.971460f,1.969338f,1.967217f,1.965099f,1.962982f,1.960867f,1.958755f,1.956643f,
1.954534f,1.952427f,1.950321f,1.948217f,1.946115f,1.944014f,1.941916f,1.939819f,1.937723f,1.935630f,
1.933538f,1.931448f,1.929359f,1.927272f,1.925187f,1.923103f,1.921021f,1.918940f,1.916861f,1.914784f,
1.912708f,1.910633f,1.908560f,1.906489f,1.904419f,1.902351f,1.900284f,1.898218f,1.896154f,1.894092f,
1.892031f,1.889971f,1.887913f,1.885856f,1.883800f,1.881746f,1.879693f,1.877642f,1.875591f,1.873543f,
1.871495f,1.869449f,1.867404f,1.865360f,1.863318f,1.861277f,1.859237f,1.857198f,1.855161f,1.853124f,
1.851089f,1.849056f,1.847023f,1.844991f,1.842961f,1.840932f,1.838904f,1.836877f,1.834851f,1.832827f,
1.830803f,1.828781f,1.826759f,1.824739f,1.822719f,1.820701f,1.818684f,1.816668f,1.814653f,1.812639f,
1.810625f,1.808613f,1.806602f,1.804592f,1.802583f,1.800574f,1.798567f,1.796561f,1.794555f,1.792551f,
1.790547f,1.788544f,1.786542f,1.784541f,1.782541f,1.780542f,1.778544f,1.776546f,1.774549f,1.772553f,
1.770558f,1.768564f,1.766570f,1.764578f,1.762586f,1.760595f,1.758604f,1.756615f,1.754626f,1.752637f,
1.750650f,1.748663f,1.746677f,1.744692f,1.742707f,1.740723f,1.738740f,1.736758f,1.734776f,1.732794f,
1.730814f,1.728834f,1.726854f,1.724875f,1.722897f,1.720920f,1.718943f,1.716966f,1.714991f,1.713015f,
1.711041f,1.709066f,1.707093f,1.705120f,1.703147f,1.701175f,1.699204f,1.697233f,1.695262f,1.693292f,
1.691323f,1.689353f,1.687385f,1.685417f,1.683449f,1.681482f,1.679515f,1.677548f,1.675582f,1.673617f,
1.671651f,1.669687f,1.667722f,1.665758f,1.663794f,1.661831f,1.659868f,1.657905f,1.655943f,1.653981f,
1.652020f,1.650058f,1.648097f,1.646136f,1.644176f,1.642216f,1.640256f,1.638296f,1.636337f,1.634378f,
1.632419f,1.630460f,1.628502f,1.626544f,1.624586f,1.622628f,1.620670f,1.618713f,1.616756f,1.614799f,
1.612842f,1.610885f,1.608929f,1.606972f,1.605016f,1.603060f,1.601104f,1.599148f,1.597192f,1.595237f,
1.593281f,1.591326f,1.589370f,1.587415f,1.585460f,1.583504f,1.581549f,1.579594f,1.577639f,1.575684f,
1.573729f,1.571774f,1.569819f,1.567864f,1.565909f,1.563954f,1.561999f,1.560043f,1.558088f,1.556133f,
1.554178f,1.552222f,1.550267f,1.548312f,1.546356f,1.544400f,1.542445f,1.540489f,1.538533f,1.536577f,
1.534620f,1.532664f,1.530707f,1.528751f,1.526794f,1.524837f,1.522880f,1.520922f,1.518965f,1.517007f,
1.515049f,1.513091f,1.511132f,1.509174f,1.507215f,1.505256f,1.503296f,1.501337f,1.499377f,1.497417f,
1.495456f,1.493496f,1.491534f,1.489573f,1.487611f,1.485649f,1.483687f,1.481725f,1.479762f,1.477798f,
1.475835f,1.473870f,1.471906f,1.469941f,1.467976f,1.466010f,1.464044f,1.462078f,1.460111f,1.458144f,
1.456176f,1.454208f,1.452239f,1.450270f,1.448301f,1.446331f,1.444360f,1.442389f,1.440417f,1.438445f,
1.436473f,1.434500f,1.432526f,1.430552f,1.428577f,1.426602f,1.424626f,1.422650f,1.420673f,1.418695f,
1.416717f,1.414738f,1.412759f,1.410779f,1.408798f,1.406817f,1.404835f,1.402853f,1.400869f,1.398885f,
1.396901f,1.394915f,1.392929f,1.390943f,1.388955f,1.386967f,1.384978f,1.382988f,1.380998f,1.379007f,
1.377015f,1.375022f,1.373029f,1.371034f,1.369039f,1.367043f,1.365047f,1.363049f,1.361051f,1.359051f,
1.357051f,1.355050f,1.353048f,1.351046f,1.349042f,1.347037f,1.345032f,1.343026f,1.341018f,1.339010f,
1.337001f,1.334990f,1.332979f,1.330967f,1.328954f,1.326940f,1.324925f,1.322909f,1.320891f,1.318873f,
1.316854f,1.314834f,1.312812f,1.310790f,1.308766f,1.306741f,1.304716f,1.302689f,1.300661f,1.298632f,
1.296601f,1.294570f,1.292537f,1.290503f,1.288468f,1.286432f,1.284395f,1.282356f,1.280316f,1.278275f,
1.276232f,1.274189f,1.272144f,1.270098f,1.268050f,1.266001f,1.263951f,1.261900f,1.259847f,1.257793f,
1.255737f,1.253680f,1.251622f,1.249562f,1.247501f,1.245438f,1.243374f,1.241309f,1.239242f,1.237174f,
1.235104f,1.233032f,1.230959f,1.228885f,1.226809f,1.224732f,1.222653f,1.220572f,1.218490f,1.216406f,
1.214321f,1.212234f,1.210145f,1.208055f,1.205963f,1.203869f,1.201774f,1.199677f,1.197578f,1.195478f,
1.193376f,1.191272f,1.189166f,1.187059f,1.184949f,1.182838f,1.180725f,1.178611f,1.176494f,1.174375f,
1.172255f,1.170133f,1.168009f,1.165883f,1.163755f,1.161625f,1.159493f,1.157359f,1.155223f,1.153085f,
1.150945f,1.148803f,1.146659f,1.144513f,1.142365f,1.140214f,1.138062f,1.135907f,1.133750f,1.131591f,
1.129430f,1.127267f,1.125101f,1.122934f,1.120763f,1.118591f,1.116416f,1.114240f,1.112060f,1.109879f,
1.107695f,1.105508f,1.103319f,1.101128f,1.098934f,1.096738f,1.094540f,1.092339f,1.090135f,1.087929f,
1.085720f,1.083509f,1.081295f,1.079079f,1.076860f,1.074638f,1.072413f,1.070186f,1.067956f,1.065724f,
1.063488f,1.061250f,1.059009f,1.056766f,1.054519f,1.052269f,1.050017f,1.047762f,1.045504f,1.043242f,
1.040978f,1.038711f,1.036441f,1.034168f,1.031891f,1.029612f,1.027329f,1.025044f,1.022755f,1.020463f,
1.018167f,1.015869f,1.013567f,1.011262f,1.008953f,1.006641f,1.004326f,1.002008f,0.999685f,0.997360f,
0.995031f,0.992698f,0.990362f,0.988022f,0.985679f,0.983332f,0.980981f,0.978627f,0.976269f,0.973907f,
0.971541f,0.969172f,0.966799f,0.964421f,0.962040f,0.959655f,0.957266f,0.954873f,0.952476f,0.950074f,
0.947669f,0.945259f,0.942845f,0.940427f,0.938005f,0.935578f,0.933148f,0.930712f,0.928272f,0.925828f,
0.923379f,0.920926f,0.918468f,0.916006f,0.913539f,0.911067f,0.908590f,0.906109f,0.903622f,0.901131f,
0.898635f,0.896134f,0.893628f,0.891117f,0.888601f,0.886080f,0.883553f,0.881021f,0.878484f,0.875942f,
0.873394f,0.870841f,0.868282f,0.865718f,0.863148f,0.860572f,0.857991f,0.855404f,0.852811f,0.850212f,
0.847607f,0.844996f,0.842379f,0.839756f,0.837127f,0.834492f,0.831850f,0.829202f,0.826548f,0.823887f,
0.821219f,0.818545f,0.815864f,0.813176f,0.810482f,0.807780f,0.805072f,0.802356f,0.799633f,0.796903f,
0.794166f,0.791422f,0.788669f,0.785910f,0.783143f,0.780368f,0.777585f,0.774794f,0.771996f,0.769189f,
0.766374f,0.763551f,0.760719f,0.757880f,0.755031f,0.752174f,0.749308f,0.746433f,0.743550f,0.740657f,
0.737755f,0.734844f,0.731923f,0.728993f,0.726053f,0.723104f,0.720144f,0.717175f,0.714195f,0.711205f,
0.708205f,0.705194f,0.702172f,0.699140f,0.696097f,0.693042f,0.689976f,0.686899f,0.683810f,0.680710f,
0.677598f,0.674473f,0.671336f,0.668187f,0.665025f,0.661851f,0.658663f,0.655462f,0.652248f,0.649020f,
0.645779f,0.642523f,0.639253f,0.635969f,0.632670f,0.629356f,0.626027f,0.622683f,0.619323f,0.615947f,
0.612555f,0.609146f,0.605721f,0.602279f,0.598819f,0.595342f,0.591846f,0.588333f,0.584801f,0.581250f,
0.577679f,0.574089f,0.570479f,0.566849f,0.563198f,0.559525f,0.555831f,0.552114f,0.548376f,0.544614f,
0.540828f,0.537019f,0.533185f,0.529326f,0.525441f,0.521531f,0.517593f,0.513628f,0.509635f,0.505613f,
0.501562f,0.497480f,0.493368f,0.489224f,0.485047f,0.480837f,0.476593f,0.472314f,0.467998f,0.463645f,
0.459255f,0.454824f,0.450354f,0.445841f,0.441286f,0.436686f,0.432040f,0.427347f,0.422605f,0.417813f,
0.412968f,0.408070f,0.403115f,0.398102f,0.393028f,0.387891f,0.382689f,0.377419f,0.372078f,0.366663f,
0.361170f,0.355597f,0.349938f,0.344190f,0.338349f,0.332409f,0.326365f,0.320211f,0.313940f,0.307546f,
0.301021f,0.294356f,0.287540f,0.280564f,0.273415f,0.266079f,0.258539f,0.250779f,0.242776f,0.234505f,
0.225937f,0.217038f,0.207764f,0.198063f,0.187868f,0.177094f,0.165630f,0.153318f,0.139937f,0.125143f,
0.108359f,0.088460f,0.062541f,0.000000f,
0};


#endif /*__MATH_TABLE__*/
